/* Task App 样式文件 - 基于shop-app.css */

/* 任务应用容器 */
.task-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 任务列表容器 */
.task-list {
  padding: 12px 16px;
  flex: 1;
  overflow-y: auto;
  background: transparent;
}

/* 任务网格 */
.task-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

/* 任务项 */
.task-item {
  background: white;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  border: 1px solid #f0f0f0;
  position: relative;
  margin-bottom: 8px;
}

.task-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.task-item.completed {
  background: #f8f9fa;
  border-color: #e9ecef;
}

.task-item.completed .task-name {
  color: #6c757d;
}

/* 任务信息 */
.task-info {
  flex: 1;
}

/* 任务头部行 - 包含任务名称和按钮/状态 */
.task-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.task-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-align: left;
  flex: 1;
}

.task-id {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
  text-align: left;
}

.task-description {
  font-size: 13px;
  color: #666;
  line-height: 1.3;
  margin-bottom: 6px;
  text-align: left;
}

.task-publisher {
  font-size: 11px;
  color: #999;
  margin-bottom: 0;
  text-align: left;
}

.task-reward {
  background: #fff8e1;
  color: #f57c00;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  text-align: left;
  border: 1px solid #ffecb3;
  display: inline-block;
}

.task-status {
  font-size: 11px;
  color: #27ae60;
  font-weight: 500;
  text-align: center;
  padding: 2px 6px;
  background: #d4edda;
  border-radius: 8px;
  display: inline-block;
}

/* 任务操作按钮 */
.accept-task-btn {
  background: #6366f1;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.accept-task-btn:hover {
  background: #5856eb;
}

.accept-task-btn:active {
  transform: none;
  box-shadow: none;
}

.back-to-tasks-btn {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-to-tasks-btn:hover {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(116, 185, 255, 0.4);
}

/* 空状态 */
.task-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #7f8c8d;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2c3e50;
}

.empty-subtitle {
  font-size: 14px;
  margin-bottom: 20px;
  color: #7f8c8d;
}

/* 标签页 */
.task-tabs {
  display: flex;
  background: white;
  border-radius: 8px;
  padding: 2px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.task-tab {
  flex: 1;
  padding: 6px 12px;
  border: none;
  background: none;
  color: #7f8c8d;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.task-tab.active {
  background: #6366f1;
  color: white;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

.task-tab:hover:not(.active) {
  background: #f8f9fa;
  color: #2c3e50;
}

/* 提示消息 */
.task-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.task-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.task-toast.info {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.task-toast.success {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.task-toast.error {
  background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
}

.task-toast.warning {
  background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .task-list {
    padding: 8px 12px;
  }

  .task-item {
    padding: 10px 12px;
  }

  .task-tabs {
    gap: 2px;
  }

  .task-tab {
    text-align: center;
  }
}

/* 滚动条样式 */
.task-list::-webkit-scrollbar {
  width: 8px;
}

.task-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.task-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.task-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* 加载动画 */
.task-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 16px;
  color: #7f8c8d;
}

.task-loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 任务状态指示器 */
.task-status-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #95a5a6;
}

.task-status-indicator.available {
  background: #3498db;
}

.task-status-indicator.in-progress {
  background: #f39c12;
}

.task-status-indicator.completed {
  background: #27ae60;
}

/* 任务优先级标签 */
.task-priority {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.task-priority.high {
  background: #e74c3c;
  color: white;
}

.task-priority.medium {
  background: #f39c12;
  color: white;
}

.task-priority.low {
  background: #95a5a6;
  color: white;
}

/* 任务标签 */
.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.task-tag {
  background: #ecf0f1;
  color: #2c3e50;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
}

/* 任务进度条 */
.task-progress {
  margin-top: 10px;
  height: 4px;
  background: #ecf0f1;
  border-radius: 2px;
  overflow: hidden;
}

.task-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

/* 任务统计卡片 */
.task-stats-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.task-stat-item {
  flex: 1;
}

.task-stat-number {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.task-stat-label {
  font-size: 12px;
  color: #7f8c8d;
  text-transform: uppercase;
  font-weight: 600;
}
